package com.diy.common.helper;

/**
 * Created by yanghonglei on 2016/1/4.
 */
public class InstanceHelper {

    //创建泛型类实例
    public static <T> T createInstance(Class<T> cls) {
        T obj = null;
        try {
            obj = cls.newInstance();
        } catch (Exception e) {
            obj = null;
        }
        return obj;
    }
}
